<?php

//数据源来自pic_feed
class ml_biz_pin_indexData extends ml_biz_pin_abstract{
    
    public function output($uid,$feed,$content){

        $this->uid        = $uid;        
        $this->uniqueData = $this->unique_Data($feed,$content);
        $this->get_cnt();
        if(!($this->is_favourite && $this->ifme)){
            $this->get_attitude();
        }
        $this->get_comment();
        //$this->get_ColCnt();
        $this->get_PicHeight();
        $this->get_nick();
        return $this->parseData();
    
    }
    public function unique_Data($feed,$content){
        
        foreach ($feed as $value) {
            $cnt = $content[$value['rid']];
                
            if($value['type'] == 9) {

                $value['is_quote'] = false;
                $value['col_id'] = $value['feed_info']['col_id'];
                $value['col_name'] = $value['feed_info']['col_name'];

            }
            //表态加
            if($value['type']== 6  ){
                $value['is_quote'] = true;
                
            }
            
            if($this->is_favourite  || $this->uid == $value['uid']) {
                $value['deleteType'] =  'deleteType=1';
            }else {
                $value['deleteType'] =  'deleteType=2';
            }
            // 转踩人的信息
            $value['quote_info']=array(
                    'uid'=>$value['uid'],
                    'content'=> $value['content'],
                    'nick'=> empty($this->aNicks[$value['uid']]) 
                                ? $this->rds_nick->getNickByUid($value['uid']) 
                                : $this->aNicks[$value['uid']]
            );
                
            $value['uid'] = $cnt['uid'];
            $value['content'] = $cnt['content'];
            $value['type_xrank'] = $cnt['type_xrank'];
            $value['comment'] = $value['content'];
            $value['gd_title'] = $cnt['gd_title'];
            $value['gd_price'] = $cnt['gd_price'];
            $value['canDel']   = true;
            $value['pic_id']=$cnt['pic_id'];   //喜欢的pic_feed中是没有pic_id的
            $this->aUid[]=$value['uid'];
            $this->aUid[]=$cnt['uid'];
            $this->aRid[]=$cnt['rid'];
            $this->aPic[]=$cnt['pic_id'];
            $list[] = $value;
        }
        return $list;
    
        
    }
}

?>